import ArrayList.ArrayIndexOutOfBoundsException;

import java.util.Scanner;

public class TextException {


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int[] array =new int[num];
        for(int i = 0;i<num;i++){
            array[i] = scanner.nextInt();
        }
        boolean t = false;
        for(int i = 0;i<num-1;i++){
            t = false;
            for(int j = 0;j<num-1;j++){
                if(array[j]>array[j+1]){
                    int tem = array[j];
                    array[j] = array[j+1];
                    array[j+1] = tem;
                    t = true;
                }
            }
            if(!t){
                break;
            }
        }
        for(int i = 0;i<num;i++){
            System.out.print(array[i]+" ");
        }
    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int Size = scanner.nextInt();
        int[] array = new int[Size];
        for(int i = 0;i<Size;i++){
            array[i] = scanner.nextInt();
        }
        int choic = scanner.nextInt();
        boolean judge = true;

        if(choic==0){
        for(int i = 0;i<Size;i++){
            judge = true;
            for(int j = 0;j<Size-1;j++){
                if(array[j]>array[j+1]){
                    int tem = array[j];
                    array[j] = array[j+1];
                    array[j+1] = tem;
                    judge = false;
                }
            }
            if(judge){
                break;
            }
        }

        }else if(choic==1){
            for(int i = 0;i<Size;i++){
                judge = true;
                for(int j = 0;j<Size-1;j++){
                    if(array[j]<array[j+1]){
                        int tem = array[j];
                        array[j] = array[j+1];
                        array[j+1] = tem;
                        judge = false;
                    }
                }
                if(judge){
                    break;
                }
            }

        }
        for(int i = 0;i<Size;i++){
            System.out.print(array[i]+" ");
        }
    }





















    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] array = new int[n];
        for(int i = 0;i<n;i++){
            array[i] = scanner.nextInt();
        }
        for(int i = 0;i<k;i++){
            int min = i;
            for(int j = 0;j<n;j++){
                if(array[min]>array[j]){
                    min = j;
                }
            }
            System.out.print(array[min]+" ");
            array[min] = 10001;
        }
    }

    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int num = scanner.nextInt()+1;
        String arr = str.substring(0,num);
        System.out.println(arr);
    }









    public static int getElement(int[] array, int index) throws NullPointerException, ArrayIndexOutOfBoundsException {
        if(null == array){
            throw new NullPointerException("传递的数组为null");
        } if(index < 0 || index >= array.length){
            throw new ArrayIndexOutOfBoundsException("传递的数组下标越界");
        }
        return array[index];
    }
    public static void main1(String[] args) {
        int[] array = {1,2,3};
        getElement(null, 3);
    }
}
